<template>
  <div>
    <div>
      <el-button @click="mocktianchong">mock填充</el-button>
    </div>
    <el-form :model="formData" :inline="true" label-width="auto">
      
      <el-form-item
        label="id"
        prop="id"
        data-type="bigint"
      >
        
        <el-input
          placeholder="id"
          style="width: 120px"
          v-model="formData['id']"
        ></el-input>
        
      </el-form-item>
      
      <el-form-item
        label="info_id"
        prop="info_id"
        data-type="bigint"
      >
        
        <el-input
          placeholder="info_id"
          style="width: 120px"
          v-model="formData['info_id']"
        ></el-input>
        
      </el-form-item>
      
      <el-form-item
        label="operator"
        prop="operator"
        data-type="varchar(50)"
      >
        
        <el-input
          placeholder="operator"
          style="width: 120px"
          v-model="formData['operator']"
        ></el-input>
        
      </el-form-item>
      
      <el-form-item
        label="operator_id"
        prop="operator_id"
        data-type="bigint"
      >
        
        <el-input
          placeholder="operator_id"
          style="width: 120px"
          v-model="formData['operator_id']"
        ></el-input>
        
      </el-form-item>
      
      <el-form-item
        label="operator_time"
        prop="operator_time"
        data-type="datetime"
      >
        
        <erp-date-picker
          placeholder="operator_time"
          style="width: 120px"
          v-model="formData['operator_time']"
          value-format="YYYY-MM-DD HH:mm:ss"
          format="YYYY-MM-DD HH:mm:ss"
        ></erp-date-picker>
        
      </el-form-item>
      
      <el-form-item
        label="content"
        prop="content"
        data-type="varchar(255)"
      >
        
        <el-input
          placeholder="content"
          style="width: 120px"
          v-model="formData['content']"
        ></el-input>
        
      </el-form-item>
      
      <el-form-item
        label="type"
        prop="type"
        data-type="tinyint"
      >
        
        <el-input
          placeholder="type"
          style="width: 120px"
          v-model="formData['type']"
        ></el-input>
        
      </el-form-item>
      
      <el-form-item
        label="tenant_type"
        prop="tenant_type"
        data-type="tinyint"
      >
        
        <el-input
          placeholder="tenant_type"
          style="width: 120px"
          v-model="formData['tenant_type']"
        ></el-input>
        
      </el-form-item>
      
      <el-form-item
        label="tenant_id"
        prop="tenant_id"
        data-type="bigint"
      >
        
        <el-input
          placeholder="tenant_id"
          style="width: 120px"
          v-model="formData['tenant_id']"
        ></el-input>
        
      </el-form-item>
      
      <el-form-item
        label="del_state"
        prop="del_state"
        data-type="tinyint"
      >
        
        <el-input
          placeholder="del_state"
          style="width: 120px"
          v-model="formData['del_state']"
        ></el-input>
        
      </el-form-item>
      
      <el-form-item
        label="server_number"
        prop="server_number"
        data-type="smallint"
      >
        
        <el-input
          placeholder="server_number"
          style="width: 120px"
          v-model="formData['server_number']"
        ></el-input>
        
      </el-form-item>
      
    </el-form>
  </div>
</template>
<script>
  import { dateFormatYYYYMMDDHHmmss, isIOS } from '@/utils'
  import { alertWithPaylod } from '@/utils/alertUtils';

import axios from "axios";
export default {
  data() {
    return {
      formData: {},
    };
  },
  methods: {
    mocktianchong,
    initByDialog(_data) {
      if (_data && _data.id) {

        
           
        
           
        
           
        
           
        
           
            _data['operator_time']=dateFormatYYYYMMDDHHmmss(_data['operator_time'])
           
        
           
        
           
        
           
        
           
        
           
        
           
        


        this.formData = _data;
      }
    },
    async submitByDialog() {
      var params = this.formData;
      var resylt = await axios
        .post("/api/erp_hrm_rival_corp_log/apis", {
          _name: "addorupdate",
          ...params,
        })
        .then((res) => res.data);
      console.log("resylt :", resylt);
      alertWithPaylod(resylt)

      return resylt;
    },
  },
};
</script>
